package org.dzq.designmode.interpreter;

import java.util.Map;

/**
 * @ClassName: VarExpression
 * @Package: org.dzq.designmode.interpreter
 * @author: 越
 * @date: 2023/6/19 21:17
 * @Description: 变量解释器
 */
public class VarExpression extends Expression{

    private String key;

    public VarExpression(String key){
        this.key = key;
    }

    @Override
    public int interpreter(Map<String, Integer> var) {
        return var.get(this.key);
    }
}
